<?php

use yii\db\Migration;

class m161022_053658_create_admin extends Migration
{
    public function up()
    {
        $this->createTable('kd_admin', [
               'user_id'=>$this->primaryKey()->comment('管理员id'),
               'user_name'=>$this->char(50)->notNull()->comment('管理员名称'),
               'password'=>$this->char(50)->notNull()->comment('管理员密码'),

               'storage'=>$this->string(200)->null()->comment('存储容量'),
               'sy_storage'=>$this->string(200)->null()->comment('剩余容量'),

            ]);

    }

    public function down()
    {
        $this->dropTable('kd_admin');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
